<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/tracing/core/test_utils.html">
<link rel="import" href="/tracing/extras/ads/domain_category.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {
  const DomainCategory = tr.e.ads.DomainCategory;
  test('domainCategory', function() {
    assert.strictEqual(
        'Ads',
        DomainCategory.fromDomain('https://parnter.googleadservices.com'));
    assert.strictEqual(
        'Analytics',
        DomainCategory.fromDomain('https://x.adobetag.com'));
    assert.strictEqual(
        'Social',
        DomainCategory.fromDomain('http://x.facebook.net'));
    assert.strictEqual(
        'Content Recommendation',
        DomainCategory.fromDomain('http://xyz.outbrain.com'));
    assert.strictEqual(
        'Tracing', DomainCategory.fromDomain('chrome://tracing'));
    assert.strictEqual(
        'Extensions',
        DomainCategory.fromDomain('chrome-extension://oiuy325oiu'));
    assert.strictEqual(
        'Other',
        DomainCategory.fromDomain('http://xyz.outbrain.com.au'));
  });
});
</script>
